package net.techwatch.fsindex;

import java.io.File;
import java.io.FileFilter;

public class ObjectFileFilter implements FileFilter {

	/**
	 * Default constructor
	 */
	public ObjectFileFilter() {
		// nothing to do
	}
	
	/* (non-Javadoc)
	 * @see java.io.FileFilter#accept(java.io.File)
	 */
	public boolean accept(File pathname) {
		if (pathname.isDirectory())
			return true;

		if (pathname.isFile()
				&& pathname.getName().matches("^.*\\.[oO][bB][jJ].*$"))
			return true;

		return false;
	}

}
